package com.net.xpay.common.domain.admin.rbac;

import com.net.common.annotation.NonDomain;
import com.net.common.domain.CommonDomain;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.util.List;

/**
 * 2019/5/31 18:00

 * 菜单
 */
@Getter
@Setter
@NoArgsConstructor
public class Menu extends CommonDomain {

    @ApiModelProperty("名字")
    private String name;

    @ApiModelProperty("操作码（功能按钮）")
    private String op;

    @ApiModelProperty("菜单对应的权限 多个权限用英文逗号分隔")
    private String permissions;

    @ApiModelProperty("层级 从0开始")
    private Integer level;

    @ApiModelProperty(notes = "是否隐藏 0.不隐藏 1.隐藏")
    private Integer hidden;

    @ApiModelProperty("排序（数字越小，排序越靠前）")
    private Long sort;

    @ApiModelProperty("页面路径")
    private String path;

    @ApiModelProperty("组件")
    private String component;

    @ApiModelProperty("页面图标")
    private String icon;

    @ApiModelProperty("上级菜单ID（顶级菜单为0）")
    private Long pid;

    @NonDomain
    @ApiModelProperty("父节点的名称")
    private String parentName;

    @NonDomain
    @ApiModelProperty("子节点")
    private List<Menu> children;
}
